let express = require('express');
let router = express.Router();
/* GET home page. */
import UrlProxy from "../../utils/UrlProxy";

/**
 * 服务代理
 */
router.all('/proxy', function(req, res, next) {
    UrlProxy(req.args.url,req.args.methodType,req.args.params).then(data=>{
        res.send(data.data);
    }).catch(e=>{
        next(e)
    })
});


module.exports = router;
